
import request from "../utils/request"
export default {
    async get(url:string){
        const res=await request.get(url)
        if(res.code===0){
            return res.data
        }
        throw res
    },
    async post(url:string,data:object){
        const res=await request.post(url,data)
        if(res.code===0){
            return res.data
        }
        throw res
    }
}